$(function(){
    var value = window.localStorage.getItem('nubia_user_name')
    if(value){
        console.log('上次登录过');
        $('.users_centre li:nth-child(2)').html('');
        $('.users_centre li:nth-child(2)').append('<a href="#">'+value+'</a><a href="#">退出</a>');
        $('.users_centre li:nth-child(2) a:first-child').css({'display':'inline-block','width':'40px','margin-right':'8px','overflow':'hidden','textOverflow':'ellipsis','vertical-align':'middle'});
        $('.users_centre li:nth-child(2) a:last-child').click(function(){
            window.localStorage.removeItem('nubia_user_name');
            setTimeout(function(){location='login.html';},1000);
        });
    }
});